//
//  SJZHexiaoResultViewController.m
//  SJZBusiness
//
//  Created by 彭利民 on 2018/5/7.
//  Copyright © 2018年 bwton. All rights reserved.
//

#import "SJZHexiaoSuccessViewController.h"

@interface SJZHexiaoSuccessViewController ()

@property (strong, nonatomic) IBOutlet UILabel *nameLabel;
@property (strong, nonatomic) IBOutlet UILabel *orderLabel;
@property (strong, nonatomic) IBOutlet UILabel *timeLabel;

@end

@implementation SJZHexiaoSuccessViewController

//- (instancetype)initWithName:(NSString *)name order:(NSString *)order time:(NSString *)time{
//    
//    if (self == [super init]) {
//        self.nameLabel.text = name;
//        self.orderLabel.text = order;
//        self.timeLabel.text = time;
//    }
//    
//    return self;
//}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"核销成功";
    self.view.backgroundColor = [UIColor colorWithRed:240/255.0 green:238/255.0 blue:238/255.0 alpha:1];

    [self setCouponModel:self.couponModel];
    
}

- (IBAction)doneAction:(UIButton *)sender {
    
    [self.navigationController popViewControllerAnimated:YES];
    
}

//- (void)setSuccessDict:(NSDictionary *)successDict{
//    
//    _successDict = successDict;
//    self.nameLabel.text = successDict[kResultData][@"voucherName"];
//    self.orderLabel.text = successDict[kResultData][@"voucherCode"];
//    self.timeLabel.text = successDict[kResultData][@"consumeTime"];
//    
//}

- (void)setCouponModel:(SJZCouponModel *)couponModel{
    
    _couponModel = couponModel;
    self.nameLabel.text = couponModel.voucherName;
    self.orderLabel.text = couponModel.voucherCode;
    self.timeLabel.text = couponModel.consumeTime;
    
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
